#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QToolButton>
#include <QMainWindow>
#include "frmbattery.h"
#include "widget.h"
#include "frmbuttondefence.h"
#include "colorwidget.h"
#include "frmcomtool.h"
#include "frmcountcode.h"
#include "frmdbpage.h"
#include "frmdevicesizetable.h"
#include "frmemailtool.h"
#include "frmflatui.h"
#include "framelesswidget.h"
#include "gifwidget.h"
#include "frmipaddress.h"
#include "frmlightbutton.h"
#include "frmlineeditnext.h"
#include "frmlunarcalendarwidget.h"
#include "frmmaskwidget.h"
#include "frmmouseline.h"
#include "frmmovewidget.h"
#include "frmnavbutton.h"
#include "frmnettool.h"
#include "frmntpclient.h"
#include "frmpngtool.h"
#include "frmqwtdemo.h"
#include "frmsavelog.h"
#include "frmsaveruntime.h"
#include "screenwidget.h"
#include "frmstyledemo.h"
#include "frmvideopanel.h"
#include "frmvideowidget.h"
#include "frmzhtopy.h"


#include "customlistview.h"
namespace Ui {
class MainWindow;
}


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

    QToolButton *minButton;
    QToolButton *maxButton;
    QToolButton *closeButton;

    QList<QWidget *> widgets;

    QWidget *frm_battery_ptr;
    QWidget *frm_bgdemo_ptr;
    QWidget *frm_btndefence_ptr;
    QWidget *frm_color_ptr;
    QWidget *frm_comtool_ptr;
    QWidget *frm_countcode_ptr;
    QWidget *frm_dbpage_ptr;
    QWidget *frm_devicesizetable_ptr;
    QWidget *frm_emailtool_ptr;
    QWidget *frm_flatui_ptr;
    QWidget *frm_frameless_ptr;
    QWidget *frm_gifwidget_ptr;
    QWidget *frm_ipaddress_ptr;
    QWidget *frm_lightbtn_ptr;
    QWidget *frm_lineeditnext_ptr;
    QWidget *frm_lunnarcaledar_ptr;
    QWidget *frm_mask_ptr;
    QWidget *frm_mouseline_ptr;
    QWidget *frm_movewidget_ptr;
    QWidget *frm_navbtn_ptr;
    QWidget *frm_nettool_ptr;
    QWidget *frm_ntpclient_ptr;
    QWidget *frm_pngtool_ptr;
    QWidget *frm_qwtdemo_ptr;
    QWidget *frm_savelog_ptr;
    QWidget *frm_saveruntime_ptr;
    QWidget *frm_screenwidget_ptr;
    QWidget *frm_styledemo_ptr;
    QWidget *frm_videopanel_ptr;
    QWidget *frm_videowidget_ptr;
    QWidget *frm_zhtopy_ptr;

    void paintEvent(QPaintEvent *);

    void initStyle();
    void initForm();
    void initData();
    void initEvent();
private slots:
    void windowClosed();
    void windowMinimize();
    void windowMaximize();

//    void on_pushButton_device_monitor_clicked();
//    void on_pushButton_map_monitor_clicked();
//    void on_pushButton_data_monitor_clicked();
//    void on_pushButton_line_monitor_clicked();
//    void on_pushButton_data_query_clicked();
//    void on_pushButton_system_monitor_clicked();
    void slot_listview_pressed(QString , QString);
};

#endif // MAINWINDOW_H
